<?php
include "../function.php";
include "../include/admin.class.php";
$admin = new Admin();
$admin->limit(1);
$error = '';

if(isset($_POST['password_submit'])){
	if($admin->checkAdminPwd($_POST['old_pwd'])){
		if($admin->updateAdminPwd($_POST['r_pwd']))echo "<script type='text/javascript'>alert('修改成功');</script>";
	}else{
		$error = '<span class="error_text error_1">原始密码错误</span>';
	}
}

?>